/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXSecurity.h"
#import "OFXAssetClassPortion.h"

@interface OFXDebt : OFXSecurity {
  NSNumber* parValue;
  NSString* debtType;
  NSString* debtClassification;

  NSNumber* couponRate;
  NSDate* maturityDateOfNextCoupon;
  NSString* maturityRate;
  
  NSNumber* callPrice;
  NSNumber* yieldToCall;
  NSDate* callDate;
  NSString* callType;
  
  NSNumber* yieldToMaturity;
  NSDate* maturityDate;
  
  NSString* assetClass;
  NSString* financialInstitutionAssetClass;  
}

/**
 * @property parValue
 * @brief Par value of debt.
 *
 * Value of debt as set by issuing entity.
 */
@property(retain) NSNumber* parValue;

/**
 * @property debtType
 * @brief Debt type: COUPON or ZERO
 *
 * Type of debt issued.
 * - COUPON: A bond issued with detachable coupons that must be presented to 
 * the issuer for interest payments
 * 
 * - ZERO: A zero-coupon bond (also called a discount bond or deep discount 
 * bond) is a bond bought at a price lower than its face value, with the face 
 * value repaid at the time of maturity. It does not make periodic interest
 * payments, or have so-called "coupons," hence the term zero-coupon bond.
 */
@property(retain) NSString* debtType;

/**
 * @property debtClassification
 * @brief Classification of debt: TREASURY, MUNICIPAL, CORPORATE, or OTHER.
 */
@property(retain) NSString* debtClassification;

/**
 * @property couponRate
 * @brief Bond coupon rate for next closest call date
 */
@property(retain) NSNumber* couponRate;

/**
 * @property maturityDateOfNextCoupon
 * @brief Maturity date for next coupon
 */
@property(retain) NSDate* maturityDateOfNextCoupon;

/**
 * @property maturityRate
 * @brief Overall interest rate paid at maturiy of bond.
 */
@property(retain) NSString* maturityRate;

/**
 * @property callPrice
 * @brief Bond call price
 */
@property(retain) NSNumber* callPrice;

/**
 * @property yieldToCall
 * @brief Yield to next call
 */
@property(retain) NSNumber* yieldToCall;

/**
 * @property callDate
 * @brief Next call date
 */
@property(retain) NSDate* callDate;

/**
 * @property callType
 * @brief Type of next call: CALL, PUT, PREFUND, MATURITY
 */
@property(retain) NSString* callType;

/**
 * @property yieldToMaturity
 * @brief Yield to maturity of bond.
 */
@property(retain) NSNumber* yieldToMaturity;

/**
 * @property maturityDate
 * @brief Maturity date of bond.
 */
@property(retain) NSDate* maturityDate;

/**
 * @property assetClass
 * @brief Asset class of debt 
 *
 * One of:
 * - DOMESTICBOND
 * - INTLBOND
 * - LARGESTOCK
 * - SMALLSTOCK
 * - INTLSTOCK
 * - MONEYMRKT
 * - OTHER
 */
@property(retain) NSString* assetClass;

/**
 * @property assetClass
 * @brief Asset class of debt 
 *
 * One of:
 * - DOMESTICBOND
 * - INTLBOND
 * - LARGESTOCK
 * - SMALLSTOCK
 * - INTLSTOCK
 * - MONEYMRKT
 * - OTHER
 */
@property(retain) NSString* financialInstitutionAssetClass;

@end
